﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhonTai.Admin.Core.Entities;
using ZhonTai.Industry.Core.Enums;

namespace ZhonTai.Industry.Domain.WorkOrder
{
    /// <summary>
    /// 工单
    /// </summary>
    /// <remarks>订单</remarks>
    [Table(Name = "prd_work_order")]
    public class WorkOrderEntity : EntityBase
    {
        /// <summary>
        /// 工单编号
        /// </summary>
        /// <remarks>订单编号</remarks>
        [Column(StringLength = 50, IsNullable = false)]
        public string OrderCode { get; set; }

        /// <summary>
        /// 工单名称
        /// </summary>
        /// <remarks>工单名称</remarks>
        [Column(StringLength = 50)]
        public string? OrderName { get; set; }

        /// <summary>
        /// 产品编码
        /// </summary>
        /// <remarks>产品编码</remarks>
        [Column(StringLength = 50)]
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        /// <remarks>产品名称</remarks>
        [Column(StringLength = 50)]
        public string? ProductName { get; set; }

        /// <summary>
        /// 计划数量
        /// </summary>
        /// <remarks>计划数量</remarks>
        public int PlanCount { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        /// <remarks>排序</remarks>
        public int Sort { get; set; }

        /// <summary>
        /// 完成数量
        /// </summary>
        /// <remarks>成功数量</remarks>
        public int SuccessCount { get; set; }

        /// <summary>
        /// 失败数量
        /// </summary>
        /// <remarks>失败数量</remarks>
        public int FailCount { get; set; }

        /// <summary>
        /// 未下线数量
        /// </summary>
        /// <remarks>未下限数量</remarks>
        public int OnLineCount { get; set; }

        /// <summary>
        /// 计划开始时间
        /// </summary>
        /// <remarks>计划开始时间</remarks>
        public DateTime PlanStartDate { get; set; }

        /// <summary>
        /// 计划结束时间
        /// </summary>
        /// <remarks>计划结束时间</remarks>
        public DateTime PlanEndDate { get; set; }

        /// <summary>
        /// 实际开始时间
        /// </summary>
        /// <remarks>实际开始时间</remarks>
        public DateTime? ActualStartDate { get; set; }

        /// <summary>
        /// 实际结束时间
        /// </summary>
        /// <remarks>实际结束时间</remarks>
        public DateTime? ActualEndDate { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        /// <remarks>状态</remarks>
        public int State { get; set; } = 0;

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
    }
}